
<aside class="right-side">
    <!-- BEGIN: Content Header (Page header) -->
    <section class="content-header">
        <h1>
            <small>Cập nhật Menu Website</small>
        </h1>
        <?php $this->load->view('admin/breadbrumb') ?>
    </section>
    <!-- END: Content Header (Page header) -->

    <!-- BEGIN: Main content -->
    <section class="content">
        <div class="box box-primary">
            <!-- BEGIN: Box-Header -->
            <div class="box-header">
                <i class="fa fa-plus-square"></i>
                <h3 class="box-title">Cập nhật Menu Website</h3>
            </div>
            <!-- END: Box-Header -->

            <!-- BEGIN: Box-Body-->
            <form action="<?php echo base_url('admin/category-list/add/submit') ?>" accept-charset="utf-8" name="basic_validate" method="post" class="form-horizontal" id="basic_validate" novalidate="novalidate" enctype="multipart/form-data">  
                <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
                <script src="<?php echo templateUrl() ?>js/backend/jquery.validate.js" type="text/javascript"></script>
                <div class="box-body">
                    <div class="form-group">
                        <label class="control-label">Tên Menu</label>
                        <div class="controls">
                            <input type="text" name="menu_name" value="" id="menu_name" class="form-control required" placeholder="Nhập tên Menu"  />                            </div>
                    </div>
                    <!--                    <div class="form-group">
                                            <label class="control-label">Kiểu liên kết</label>
                                            <div class="controls">
                                                <input type="radio" checked name="menu_type" data_active="link_default" class="click_select" value="1"> Mặc định                                <input type="radio"   name="menu_type" data_active="link_file" class="click_select" value="2"> Link File
                                                <input type="radio" name="menu_type" data_active="link_other" class="click_select" value="3"> Link Khác                                <input type="hidden" id="hd_meny_type" value="1" />
                                            </div>
                                        </div>-->

                    <!-- BEGIN: Chọn trạng thái -->
                    <div class="form-group">
                        <label class="control-label">Mặc định</label>
                        <div class="controls">
                            <input type="text" name="menu_alias" value="" id="menu_alias" class="form-control" placeholder="Ex: cms-admin"  />                            </div>
                    </div>
                    <!--
                        <div class="form-group active_link_default active_link_comon">
                            <label class="control-label"><label>Mặc định</label></label>
                            <div class="controls">
                                <input type="text" name="menu_alias" value="thong-tin-cong-ty" id="menu_alias" class="form-control" placeholder="Ex: cms-admin"  />                                </div>
                        </div>

                        <div class="form-group active_link_other active_link_comon">
                            <label class="control-label"><label>Liên kết link</label></label>
                            <div class="controls">
                                <input type="text" name="menu_link" value="" id="menu_link" class="form-control" placeholder="Ex: http://diadiem24h.vn"  />                                </div>
                        </div>
                        <div class="form-group active_link_file active_link_comon">
                            <label class="control-label"><label>Liên kết file</label></label>
                            <div class="controls">
                        <span class="btn btn-success fileinput-button btn-mini">
                            <span>Select files...</span>
                            <input id="fileupload" type="file" name="files[]" multiple="">
                        </span>
                                <p>Upload progress</p>
                                <div id="progress" class="progress progress-success progress-striped">
                                    <div class="bar"></div>
                                </div>
                                <p>Files uploaded:</p>
                                <ul id="files" class="file_reset"></ul>
                            </div>
                        </div>
                    -->
                    <!-- END: Chọn trạng thái -->
                    <div class="row">
                        <!--                        <div class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                                                    <div class="form-group">
                                                        <label class="control-label">Thể loại</label>
                                                        <select name="menu_com" id='menu_com' class='form-control'>
                                                            <option value="0">--Mời bạn chọn thể loại--</option>
                                                            <option value="Trang chủ">Trang chủ</option>
                                                            <option value="Bài viết" selected="selected">Bài viết</option>
                                                            <option value="Liên hệ">Liên hệ</option>
                                                            <option value="Hình ảnh">Hình ảnh</option>
                                                            <option value="Sản phẩm">Sản phẩm</option>
                                                        </select>                                
                                                    </div>
                                                    <div class="print_menu_com_display">
                                                        <div class="fl pd5">
                                                            <label >
                                                                <input  type="radio" value="3" name="menu_view" class="mrt0" />
                                                                <span> &nbsp;Danh sách</span>
                                                            </label>
                                                        </div>
                                                        <div class="fl pd5">
                                                            <label >
                                                                <input checked type="radio" value="4" name="menu_view" class="mrt0" />
                                                                <span>&nbsp;Chi tiết</span>
                                                            </label>
                                                        </div>
                                                        <input type="hidden" value="2" id="hdmenu_view" />              
                                                    </div>
                                                </div>-->
                        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
                            <div class="form-group">
                                <label class="control-label">Danh mục cấp cha</label>
                                <select name="menu_parent" class="form-control">
                                    <option value="0">--- Danh mục cấp cha ---</option>
                                    <?php
                                    if (!empty($select_menu)) {
                                        for ($i = 0; $i < count($select_menu); $i++) {
                                            ?>
                                            <option value="<?php echo $select_menu[$i]['id'] ?>"><?php echo $select_menu[$i]['name'] ?></option>
                                            <?php
                                        }
                                    }
                                    ?>
                                </select>
                            </div>
                        </div>
                        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
                            <div class="form-group">
                                <label class="control-label">STT</label>
                                <div class="controls">
                                    <input type="text" name="menu_orderby" value="1" id="menu_orderby" class="form-control required"  />       
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">Description</label>
                        <div class="controls">
                            <!--<textarea  id="menu_detail" name="menu_detail"></textarea>-->
                            <textarea class="textarea" name="menu_detail" placeholder="Nhập nội dung" style="width: 100%; height: 125px; font-size: 14px; line-height: 18px; border: 1px solid #dddddd; padding: 10px;"></textarea>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                            <div class="form-group">
                                <label class="control-label">Trạng thái</label>
                                <div class="controls">
                                    <input type="radio" name="menu_status" value="1" checked> <i class="fa fa-eye"></i> Hiển thị   
                                    <input type="radio" name="menu_status" value="0" > <i class="fa fa-eye-slash"></i> Ẩn                                    </div>
                            </div>
                        </div>
                        <!--                        <div class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                                                    <div class="form-group">
                                                        <label class="control-label">Menu Home</label>
                                                        <div class="controls">
                                                            <input type="radio"  name="menu_home" value="1" > <i class="fa fa-eye"></i> Hiển thị      
                                                            <input type="radio" name="menu_home" value="0" checked> <i class="fa fa-eye-slash"></i> Ẩn                                    </div>
                                                    </div>
                                                </div>
                                                <div class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                                                    <div class="form-group">
                                                        <label class="control-label">Menu Hot</label>
                                                        <div class="controls">
                                                            <input type="radio"  name="menu_hot" value="1" > <i class="fa fa-eye"></i> Hiển thị       
                                                            <input type="radio" name="menu_hot" value="0" checked> <i class="fa fa-eye-slash"></i> Ẩn                                    </div>
                                                    </div>
                                                </div>-->
                    </div>
                    <!--                    <div class="form-group">
                                            <label class="control-label">Biểu tượng</label>
                                            <div class="input-group">
                                                <div class="input-group-addon">
                                                    <i class="fa fa-home"></i>
                                                </div>
                                                <input class="form-control menu_icon" name="menu_icon" id="menu_icon" value="">
                                                <span class="input-group-btn">
                                                    <a href="http://fontawesome.io/icons/" target="_blank" title="Bấm vào để tìm Biểu tượng">
                                                        <button class="btn btn-info btn-flat" type="button"><i class="fa fa-search"></i></button>
                                                    </a>
                                                </span>
                                            </div>
                                        </div>-->

                    <!--begin anh dai dien-->
                    <!--                    <div class="control-group">
                                            <label class="control-label">Ảnh đại diện</label>
                                            <div class="controls">
                                                <span class="btn btn-success fileinput-button btn-sm">
                                                    <span>Chọn file ...</span>
                                                    <input id="menu_picture" type="file" name="files[]" multiple="">
                                                </span>
                    
                                                <div class="progress-ts">
                                                    <i class="fa fa-upload"></i>
                    
                                                    <div id="progress_picture" class="progress sm progress-striped active">
                                                        <div class="progress-bar progress-bar-success bar" role="progressbar" aria-valuenow="20"
                                                             aria-valuemin="0" aria-valuemax="100">
                                                        </div>
                    
                                                    </div>
                                                </div>
                                                <div class="alert alert-info alert-dismissable">
                                                    <i class="fa fa-cloud"></i>
                                                    <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                                                    <p>File đã tải lên:</p>
                                                    <ul id="files_picture" class="file_reset">
                                                    </ul>
                                                </div>
                                            </div>
                                        </div>-->
                    <!--end anh dai dien-->
                </div>
                <!-- END: Box-Body-->

                <!-- BEGIN: Box-Footer-->
                <div class="box-footer text-center">
                    <button type="submit" class="btn btn-primary">
                        <i class="fa fa-save"></i>
                        <span>Lưu</span>
                    </button>
                    <button type="reset" class="btn btn-danger">
                        <i class="fa fa-refresh"></i>
                        <span>Nhập lại</span>
                    </button>
                </div>
                <!-- END: Box-Footer-->
            </form>
            <script type="text/javascript">
                var j = jQuery.noConflict();
                j(document).ready(function() {
                    j("#basic_validate").validate({
                        rules: {
                            menu_name: "required",
                            menu_alias: 'required',
                            menu_orderby: 'required'

                        },
                        messages: {
                            menu_name: "Hãy điền tên menu.",
                            menu_alias: "Hãy điền giống tên menu",
                            menu_orderby: "Hãy thứ tự xuất hiện menu"
                        }
                    });
                });

            </script>  
        </div>
    </section>
    <!-- END: Main content -->
</aside>
